<%@ include file="/taglib/init.jsp" %>

<%@ page import="com.zzzzzz.core.servlet.SessionMessages" %>

<%
String key = (String)request.getAttribute("zzzzzz-ui:message:key");
String type = (String)request.getAttribute("zzzzzz-ui:message:type");
%>

<c:if test="<%= SessionMessages.contains(request, key) %>">
	<%
	if(type.equalsIgnoreCase("success")) {
	%>
		<div class="msg-success">
	<%
	}else if(type.equalsIgnoreCase("error")) {
	%>
		<div class="msg-error">
	<%
	}else if(type.equalsIgnoreCase("info")) {
	%>
		<div class="msg-info">
	<%
	}else if(type.equalsIgnoreCase("alert")) {
	%>
		<div class="msg-alert">
	<%
	}
	%>
		<%= SessionMessages.get(request, key) %>
		</div>
		
	<%
		SessionMessages.clear(request);
	%>
</c:if>
